const express = require("express");
const admin = express.Router();

admin.get("/login", require("./admin/loginPage"));

admin.post("/login", require("./admin/login"));

admin.get("/user", require("./admin/userPage"));

// 用户编辑页面路由
admin.get('/user-edit', require('./admin/user-edit.js'))

// 用户添加路由
admin.post('/user-edit', require('./admin/user-edit-fn.js'))

// 用户修改路由
admin.post('/user-modify', require('./admin/user-modify-fn.js'))

// 用户删除路由
admin.get('/user-delete', require('./admin/user-delete-fn.js'))

// 退出登录
admin.get("/logout", require('./admin/logout'));




// 文章列表页面路由
admin.get('/article', require('./admin/article'))
// 文章编辑页面路由
admin.get('/article-edit', require('./admin/article-edit'))

// 文章添加
admin.post('/article-add', require('./admin/article-add'))



module.exports = admin;
